

import 'package:flutter_encrypt_decrypt/flutter_des.dart';

class Des3Utils{
  static String CRYPT_KEY = "yourCryp";
  static String IV = "your#%&@";  //IV必须为8位

  ///String ens = await Des3Utils.encrypt(msg);
  static Future<String> encrypt(String message) async {
    return await FlutterDes.encryptToBase64(message, CRYPT_KEY, iv: IV);
  }

  static Future<String> decrypt(String message) async {
    return await FlutterDes.decryptFromBase64(message, CRYPT_KEY, iv: IV);
  }

/**
 * var encrypt = await FlutterDes.encrypt(string, key, iv: iv);
    var decrypt = await FlutterDes.decrypt(encrypt, key, iv: iv);
    var encryptHex = await FlutterDes.encryptToHex(string, key, iv: iv);
    var decryptHex = await FlutterDes.decryptFromHex(encryptHex, key, iv: iv);
    var encryptBase64 = await FlutterDes.encryptToBase64(string, key, iv: iv);
    var decryptBase64 = await FlutterDes.decryptFromBase64(encryptBase64, key, iv: iv);
 */
}